package com.demo.rabbitmq.config;

public enum DirectQueueEnum {

    DIRECT_QUEUE("direct_queue", DirectExchangeEnum.DIRECT_EXCHANGE, DirectRoutingKeyEnum.DIRECT_QUEUE_ROUTING_KEY, true),
    DIRECT_EXCEPTION_QUEUE("direct_exception_queue", DirectExchangeEnum.DIRECT_EXCHANGE, DirectRoutingKeyEnum.DIRECT_EXCEPTION_QUEUE_ROUTING_KEY, true),
    CLUSTER_DIRECT_QUEUE("cluster_direct_queue", DirectExchangeEnum.DIRECT_EXCHANGE, DirectRoutingKeyEnum.CLUSTER_DIRECT_QUEUE_ROUTING_KEY, true),
    MIRROR_DIRECT_QUEUE("mirror_direct_queue", DirectExchangeEnum.DIRECT_EXCHANGE, DirectRoutingKeyEnum.MIRROR_DIRECT_QUEUE_ROUTING_KEY, true),
    DIRECT_NOT_DURABLE_QUEUE("direct_not_durable_queue", DirectExchangeEnum.DIRECT_NOT_DURABLE_EXCHANGE, DirectRoutingKeyEnum.DIRECT_QUEUE_NOT_DURABLE_ROUTING_KEY, false);

    private final String queueName;
    private final DirectExchangeEnum exchangeEnum;
    private final DirectRoutingKeyEnum routingKeyEnum;
    private final boolean durable;

    DirectQueueEnum(String queueName, DirectExchangeEnum exchangeEnum, DirectRoutingKeyEnum routingKeyEnum, boolean durable) {
        this.queueName = queueName;
        this.exchangeEnum = exchangeEnum;
        this.routingKeyEnum = routingKeyEnum;
        this.durable = durable;
    }

    public DirectExchangeEnum getExchange() {
        return this.exchangeEnum;
    }

    public String getQueueName() {
        return this.queueName;
    }

    public String getRoutingKeyName() {
        return this.routingKeyEnum.getRoutingKeyName();
    }

    public boolean isDurable() {
        return durable;
    }
}
